package main

import (
	"fmt"
	"net/rpc"
)

func main() {
	// 1.建立连接
	client, _ := rpc.Dial("tcp", ":8080")

	// 2.调用方法
	var reply string
	err := client.Call("HelloService.SayHi", "Felix", &reply)
	if err != nil {
		panic("远程调用失败")
	}

	fmt.Println("reply: ", reply)
}
